package uriel.frankel.model;


public class AdvancedStudyFund implements socialThings {

	
	private static final int roofOfKerenHishtalmutWithoutTaxes = 15712;
	public double mSocialPaymentSalary;
	
	private double kerenPercantage = 0.025;
	public double moneyWithoutTaxes;
	public double myMoneyAbove;
	public double allMoneyAbove;
	
	public AdvancedStudyFund(double socialPaymentSalary) {
		mSocialPaymentSalary = socialPaymentSalary;
		if(socialPaymentSalary > roofOfKerenHishtalmutWithoutTaxes){
			
			moneyWithoutTaxes = roofOfKerenHishtalmutWithoutTaxes * kerenPercantage  ;
			myMoneyAbove = socialPaymentSalary - roofOfKerenHishtalmutWithoutTaxes;
			allMoneyAbove = 3*(myMoneyAbove*kerenPercantage);
		}else {
			moneyWithoutTaxes = socialPaymentSalary  * kerenPercantage;
			myMoneyAbove = 0;
			allMoneyAbove = 0;
		}
	}

	
	
	
	
	
	@Override
	public double addThisMoneyToTaxesSalary(){
		return allMoneyAbove;
	}
	
	
	public double getMoneyAfter6Years(){
		return mSocialPaymentSalary*kerenPercantage*4*12*6;
	}
	
	@Override
	public double removeFromBankSalary(){
		return kerenPercantage * mSocialPaymentSalary;
	}
	
}
